package com.qianhong.crm.settings.service.impl;

import com.qianhong.crm.settings.domain.Login;
import com.qianhong.crm.settings.domain.User;
import com.qianhong.crm.settings.mapper.UserMapper;
import com.qianhong.crm.settings.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
import java.util.Map;
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User queryUserByLoginActAndPwd(Map<String, Object> map) {
         User user = userMapper.selectUserByLoginActAndPwd(map);
        return user;
    }

    @Override
    public List<User> queryAllUsers() {
        return userMapper.selectAllUsers();
    }

    @Override
    public int saveInsertInto(User user) {
        return userMapper.insertInsertInto(user);
    }

    @Override
    public int saveInsertLogin(Login login) {
        return userMapper.insertLogin(login);
    }

    @Override
    public User selectUser(String loginAct) {
        return userMapper.selectUser(loginAct);
    }
}
